package com.lhz.model.param;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

@Data
@Schema(description = "分页查询参数", name = "分页查询参数", type = "object")
public class BaseQueryParam implements Serializable {

    @Schema(description = "当前页码")
    private Integer pageNum;

    @Schema(description = "每页数量")
    private Integer pageSize;

    /**
     * 数据范围（1：全部数据 2：自定义数据 3：本公司及以下数据 4：本级公司(公司直属部门) 5：本部门及以下数据 6：本部门数据  7:个人数据）
     */
    @Schema(description = "数据权限范围", hidden = true)
    private Integer dataScope = null;

    /**
     * 需要在xml的sql条件语句最后写上
     * <if test="dataScope!=null">
     * ${dataScopeSql}
     * </if>
     */
    @Schema(description = "数据权限执行sql", hidden = true)
    private String dataScopeSql;

    /**
     * 自定义数据
     */
    @Schema(description = "数据权限：部门id集合", hidden = true)
    private List<Long> deptIds = null;

    @Schema(description = "用户id", hidden = true)
    private Long userId = null;

    @Schema(description = "默认公司id", hidden = true)
    private Long defaultCompanyId = null;

    @Schema(description = "默认部门id", hidden = true)
    private Long defaultDeptId = null;

    @Schema(description = "开始时间")
    private LocalDateTime startTime;

    @Schema(description = "结束时间")
    private LocalDateTime endTime;
}

